<?php
require_once("Controller/MemberController.php");
require_once("Controller/MasterController.php");

require_once ("View/MemberView.php");
require_once ("View/PageView.php");
require_once ("View/NavigationView.php");

require_once ("Model/MemberHandler.php");
require_once ("Model/MemberDAL.php");
require_once ("Model/Member.php");
require_once ("Model/MemberHandler.php");
require_once("Model/BoatDAL.php");
require_once("Model/BoatRegister.php");
require_once("Model/Boat.php");
require_once("Model/searchAlternatives/SearchAlternativesFactory.php");
require_once("Model/searchAlternatives/BoatInfoAlternative.php");
require_once ("Model/searchAlternatives/BoatLengthAlternative.php");
require_once ("Model/searchAlternatives/BoatTypeAlternative.php");
require_once ("Model/searchAlternatives/MemberNameAlternative.php");
require_once ("Model/searchAlternatives/MemberSsnAlternative.php");
require_once ("Common/DBConnection.php");
require_once ("Common/settings.php");

$dbConnection = new DBConnection();
$dbConnection->Connect();
$pageView = new PageView();
$memberView = new MemberView();

$memberDAL = new MemberDAL($dbConnection);
$boatDAL = new BoatDAL($dbConnection);
$boatRegister = new BoatRegister($boatDAL);

$memberHandler = new MemberHandler($memberDAL);
$memberController = new MemberController($memberView, $memberDAL, $memberHandler, $boatRegister);

$pageView -> AddStyleSheet("css/workshopStyle.css");
$masterController = new MasterController($memberController);
$xhtml = $masterController->DoControl();
$dbConnection->Close();
//Writes Xhtml for body and head.
echo $pageView -> GetXHTML10StrictPage("Den glade piraten adminsida", $xhtml);
